package com.example.service.impl;

import com.example.conditional.ProfileConditional;
import com.example.dto.SmsCodeResponse;
import com.example.service.SmsCodeService;
import org.springframework.stereotype.Service;

@Service
@ProfileConditional({"dev", "test"})
public class MockSmsCodeServiceImpl implements SmsCodeService {
    
    @Override
    public SmsCodeResponse sendCode(String phone) {
        String code = "123456"; // 这里模拟生成的验证码
        String result = "success";
        SmsCodeResponse response = new SmsCodeResponse(code, result);

        System.out.println("模拟发送短信验证码到手机号: " + phone + " 验证码: " + code);
        return response;
    }
    
}
